﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TwitterNameTableAdapters;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        UsersTableAdapter usersAdapter = new UsersTableAdapter();
        //GridView GridView1 = new GridView();

        string userid = HttpContext.Current.User.Identity.Name.ToString(); 
        //if (usersAdapter.ScalarQuery_IsAdmin(Convert.ToString(userid))>0
        //if (Convert.ToString((usersAdapter.GetDataBy_ISAdmin(Convert.ToString(userid))) 
        //    usersAdapter.ScalarQueryIsAdmin(Convert.ToString(userid))
        //)   {
         //GridView1.DataSource = usersAdapter.GetData();
        //}else{
        GridView1.DataSource = usersAdapter.GetDataByNICK(Convert.ToString(userid));
        GridView1.DataSourceID = "";
        //}
        
       GridView1.DataBind(); 
    }
    protected void ManageProducts_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
    {

    }
}
